<template>
    <div class="footer">
        <div class="image">
            <Picture image="https://wuminghui.top:9000/wlmtsys/2024/09/10/8b4cbecec39b425ab98bf0f17fea518f.png"></Picture>
        </div>

        <div class="links">
            <router-link to="/news">新闻动态</router-link>
            <router-link to="/project">项目介绍</router-link>
            <router-link to="/teams">团队介绍</router-link>
            <router-link to="/joinUs">加入我们</router-link>
            <router-link to="/about">关于我们</router-link>
        </div>
        <div class="info">
            <div class="title">联系我们</div>
            <span>{{email}}</span>
            <span>+86 {{phone}}</span>
            <span class="border-bottom">{{address}}</span>
            <div class="title">关注我们</div>
            <div class="qrcode">
                <img :src="weimg" alt="微信二维码">
                <div>微信公众号</div>
            </div>
        </div>
    </div>
</template>

<script>
import axios from '../config/http';
export default {
    data() {
        return {
        phone:'',
        weimg:'',
        email:'',
        address:''
        }
    },
    created() {
        this.loadData()
    },
    components: {
        Picture: () => import('@/components/Picture.vue')
    },
    methods:{
        async loadData() {
			// 获取首页介绍
			let res = await axios.get(`/is/info/intro`);
			    this.phone = res.data.data.data[0].phone
                this.address = res.data.data.data[0].address
                this.email = res.data.data.data[0].email
                this.weimg = res.data.data.data[0].weimg
                
		}
    }
}
</script>

<style lang="less" scoped>
.footer {
    position: relative;
    display: flex;
    background-color: #969bac;
    height: 300px;
    width: 100%;
    font-size: 14px;
    color: #e8e9f0;
    overflow: hidden;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            linear-gradient(90deg, rgba(0, 255, 157, 0.03) 1px, transparent 1px),
            linear-gradient(rgba(0, 255, 157, 0.03) 1px, transparent 1px);
        background-size: 20px 20px;
        z-index: 1;
    }

    .image {
        position: relative;
    display: flex;
    width: 50%;
        z-index: 2;

        img {
    width: 40%;
    margin: auto;
            filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.2));
            transition: all 0.3s ease;

            &:hover {
                transform: scale(1.05);
                filter: drop-shadow(0 0 15px rgba(0, 255, 157, 0.3));
            }
        }
    }

    .links {
        position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 40px 20px;
        z-index: 2;

        a {
    text-decoration: none;
            color: #e8e9f0;
            position: relative;
            padding: 5px 0;
            transition: all 0.3s ease;

            &::before {
                content: '';
                position: absolute;
                left: -15px;
                top: 50%;
                width: 10px;
                height: 2px;
                background: #00ff9d;
                transform: scaleX(0);
                transition: transform 0.3s ease;
            }

            &:hover {
                color: #00ff9d;
                transform: translateX(10px);
                text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);

                &::before {
                    transform: scaleX(1);
                }
            }
        }
    }

    .info {
        position: relative;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 5em;
    margin-right: 5%;
        z-index: 2;

        .title {
            margin: 1em 0;
            color: #00ff9d;
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 2px;
            text-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
        }

        span {
    line-height: 1.8em;
            color: rgba(232, 233, 240, 0.8);
            transition: all 0.3s ease;

            &:hover {
                color: #e8e9f0;
                text-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
            }
}

        .border-bottom {
            padding-bottom: 1em;
            border-bottom: solid 1px rgba(0, 255, 157, 0.2);
            width: 100%;
        }

        .qrcode {
            font-size: 12px;
            
            img {
    width: 5em;
    height: 5em;
                border: 2px solid rgba(0, 255, 157, 0.2);
                border-radius: 8px;
                transition: all 0.3s ease;

                &:hover {
                    transform: scale(1.05);
                    border-color: #00ff9d;
                    box-shadow: 0 0 15px rgba(0, 255, 157, 0.2);
                }
            }

            div {
                margin-top: 5px;
                color: rgba(232, 233, 240, 0.8);
            }
        }
    }
}

@media screen and (max-width: 768px) {
    .footer {
        flex-direction: column;
        height: 600px;
        font-size: 14px;

        .image {
        margin: 0 auto;

            img {
        width: 100%;
            }
    }

        .links {
        flex-direction: row;
        justify-content: space-around;
        padding: 0;
        padding-bottom: 20px;
        margin: 0 20px;
        margin-bottom: 20px;
            border-bottom: solid 1px rgba(0, 255, 157, 0.3);

            a::before {
                display: none;
            }
        }

        .info {
        margin-left: 0;
        margin-right: auto;
        padding: 0 3em;
        margin-right: 5%;
    }
    }
}

@media screen and (max-width: 420px) {
    .footer {
        height: 380px;
        font-size: 12px;

        .image img {
        width: 75%;
    }

        .links {
        padding-bottom: 10px;
        margin-bottom: 10px;
        }

        .qrcode div {
        font-size: 8px;
        }
    }
}
</style>